package com.sx.gongzhong.adapter;


import android.content.Context;
import android.widget.TextView;

import com.sx.gongzhong.R;
import com.sx.gongzhong.model.PublicBean;
import com.zhy.adapter.abslistview.CommonAdapter;
import com.zhy.adapter.abslistview.ViewHolder;

import java.util.List;

/**
 * Created by XZY on 2017/11/23.
 *  举报类型的选择
 */
public class ReportTypeAdapter extends CommonAdapter<PublicBean> {

    private Context context;
    private int select=0;

    public void setSelect(int select) {
        this.select = select;
        notifyDataSetChanged();
    }

    public ReportTypeAdapter(Context context, int layoutId, List<PublicBean> datas) {
        super(context, layoutId, datas);
        this.context=context;
    }

    @Override
    protected void convert(ViewHolder viewHolder, final PublicBean item, int position) {
        TextView tvName=viewHolder.getView(R.id.tv_Content);
        tvName.setText(item.getName());
        tvName.setEnabled(select==position);
    }
}
